
<!doctype html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module StatTable</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong>StatTable</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/media/disk-1/data/zdstack/trunk/ZDStack/StatTable.py">/media/disk-1/data/zdstack/trunk/ZDStack/StatTable.py</a></font></td></tr></table>
    <p></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="StatTable.html#StatTable">StatTable</a>
</font></dt></dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="StatTable">class <strong>StatTable</strong></a></font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#StatTable">StatTable</a>&nbsp;is&nbsp;a&nbsp;table&nbsp;of&nbsp;columns&nbsp;and&nbsp;rows.<br>
&nbsp;<br>
<a href="#StatTable">StatTable</a>&nbsp;can&nbsp;export&nbsp;its&nbsp;data&nbsp;as&nbsp;a&nbsp;list&nbsp;of&nbsp;dicts&nbsp;or&nbsp;a<br>
CSV-formatted&nbsp;string.&nbsp;&nbsp;Columns&nbsp;must&nbsp;be&nbsp;strings.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="StatTable-__init__"><strong>__init__</strong></a>(self, columns<font color="#909090">=[]</font>, rows<font color="#909090">=[]</font>)</dt></dl>

<dl><dt><a name="StatTable-add_column"><strong>add_column</strong></a>(self, column)</dt><dd><tt>Adds&nbsp;a&nbsp;column&nbsp;to&nbsp;self.<strong>columns</strong>.<br>
&nbsp;<br>
column:&nbsp;a&nbsp;string&nbsp;representing&nbsp;a&nbsp;column&nbsp;to&nbsp;add</tt></dd></dl>

<dl><dt><a name="StatTable-add_row"><strong>add_row</strong></a>(self, row)</dt><dd><tt>Adds&nbsp;a&nbsp;row&nbsp;to&nbsp;self.<strong>rows</strong>.<br>
&nbsp;<br>
row:&nbsp;a&nbsp;dict&nbsp;mapping&nbsp;columns&nbsp;to&nbsp;values&nbsp;or&nbsp;a&nbsp;sequence&nbsp;of&nbsp;values</tt></dd></dl>

<dl><dt><a name="StatTable-export_csv"><strong>export_csv</strong></a>(self)</dt><dd><tt>Exports&nbsp;this&nbsp;table's&nbsp;data&nbsp;as&nbsp;a&nbsp;CSV-formatted&nbsp;string.</tt></dd></dl>

<dl><dt><a name="StatTable-export_dicts"><strong>export_dicts</strong></a>(self)</dt><dd><tt>Exports&nbsp;this&nbsp;table's&nbsp;data&nbsp;as&nbsp;a&nbsp;list&nbsp;of&nbsp;dicts.</tt></dd></dl>

<dl><dt><a name="StatTable-insert_column"><strong>insert_column</strong></a>(self, column, index)</dt><dd><tt>Inserts&nbsp;a&nbsp;column&nbsp;into&nbsp;self.<strong>columns</strong>.<br>
&nbsp;<br>
column:&nbsp;a&nbsp;string&nbsp;representing&nbsp;the&nbsp;column&nbsp;to&nbsp;insert<br>
index:&nbsp;&nbsp;an&nbsp;int&nbsp;representing&nbsp;the&nbsp;index&nbsp;to&nbsp;insert&nbsp;the&nbsp;column&nbsp;at.</tt></dd></dl>

<dl><dt><a name="StatTable-insert_row"><strong>insert_row</strong></a>(self, row, index)</dt><dd><tt>Inserts&nbsp;a&nbsp;row&nbsp;into&nbsp;self.<strong>rows</strong>.<br>
&nbsp;<br>
row:&nbsp;&nbsp;a&nbsp;dict&nbsp;mapping&nbsp;columns&nbsp;to&nbsp;values&nbsp;or&nbsp;a&nbsp;sequence&nbsp;of&nbsp;values<br>
index:&nbsp;an&nbsp;int&nbsp;representing&nbsp;the&nbsp;index&nbsp;at&nbsp;which&nbsp;to&nbsp;insert&nbsp;row</tt></dd></dl>

<dl><dt><a name="StatTable-move_column"><strong>move_column</strong></a>(self, name, new_index)</dt><dd><tt>Moves&nbsp;a&nbsp;column.<br>
&nbsp;<br>
column:&nbsp;&nbsp;&nbsp;&nbsp;a&nbsp;string&nbsp;representing&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;column&nbsp;to&nbsp;move<br>
new_index:&nbsp;an&nbsp;int&nbsp;representing&nbsp;the&nbsp;index&nbsp;to&nbsp;move&nbsp;the&nbsp;column&nbsp;to</tt></dd></dl>

<dl><dt><a name="StatTable-move_row"><strong>move_row</strong></a>(self, old_index, new_index)</dt><dd><tt>Moves&nbsp;a&nbsp;row&nbsp;from&nbsp;one&nbsp;spot&nbsp;to&nbsp;another.<br>
&nbsp;<br>
old_index:&nbsp;an&nbsp;int&nbsp;representing&nbsp;the&nbsp;index&nbsp;of&nbsp;the&nbsp;row&nbsp;to&nbsp;move<br>
new_index:&nbsp;an&nbsp;int&nbsp;representing&nbsp;the&nbsp;index&nbsp;to&nbsp;move&nbsp;the&nbsp;row&nbsp;to</tt></dd></dl>

<dl><dt><a name="StatTable-remove_column"><strong>remove_column</strong></a>(self, column)</dt><dd><tt>Removes&nbsp;a&nbsp;column&nbsp;from&nbsp;self.<strong>columns</strong>.<br>
&nbsp;<br>
column:&nbsp;a&nbsp;string&nbsp;representing&nbsp;the&nbsp;column&nbsp;to&nbsp;remove</tt></dd></dl>

<dl><dt><a name="StatTable-remove_row"><strong>remove_row</strong></a>(self, index)</dt><dd><tt>Removes&nbsp;a&nbsp;row&nbsp;from&nbsp;self.<strong>rows</strong>.<br>
&nbsp;<br>
index:&nbsp;an&nbsp;int&nbsp;representing&nbsp;the&nbsp;index&nbsp;of&nbsp;the&nbsp;row&nbsp;to&nbsp;remove</tt></dd></dl>

<dl><dt><a name="StatTable-rename_column"><strong>rename_column</strong></a>(self, old_name, new_name)</dt><dd><tt>Renames&nbsp;a&nbsp;column.<br>
&nbsp;<br>
old_name:&nbsp;a&nbsp;string&nbsp;representing&nbsp;the&nbsp;name&nbsp;of&nbsp;the&nbsp;column&nbsp;to<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rename<br>
new_name:&nbsp;a&nbsp;string&nbsp;representing&nbsp;the&nbsp;new&nbsp;name&nbsp;of&nbsp;the&nbsp;column</tt></dd></dl>

<dl><dt><a name="StatTable-set_row"><strong>set_row</strong></a>(self, index, row)</dt><dd><tt>Sets&nbsp;a&nbsp;row&nbsp;to&nbsp;self.<strong>rows</strong>.<br>
&nbsp;<br>
index:&nbsp;an&nbsp;int&nbsp;representing&nbsp;the&nbsp;index&nbsp;of&nbsp;the&nbsp;row&nbsp;to&nbsp;set<br>
row:&nbsp;&nbsp;&nbsp;a&nbsp;dict&nbsp;mapping&nbsp;columns&nbsp;to&nbsp;values&nbsp;or&nbsp;a&nbsp;sequence&nbsp;of&nbsp;values</tt></dd></dl>

</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-Lock"><strong>Lock</strong></a> = allocate_lock(...)</dt><dd><tt>allocate_lock()&nbsp;-&gt;&nbsp;lock&nbsp;object<br>
(allocate()&nbsp;is&nbsp;an&nbsp;obsolete&nbsp;synonym)<br>
&nbsp;<br>
Create&nbsp;a&nbsp;new&nbsp;lock&nbsp;object.&nbsp;&nbsp;See&nbsp;LockType.__doc__&nbsp;for&nbsp;information&nbsp;about&nbsp;locks.</tt></dd></dl>
</td></tr></table>
</body></html>